﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Serialization;

namespace Payton.WP7.Common.Model
{    
    public class ImageResolution
    {
        public ImageResolution()
        {
 
        }

        public ImageResolution(int h, int w, int q)
        {
            height = h;
            width = w;
            quality = q;
        }

        int height;

        public int Height
        {
            get { return height; }
            set { height = value; }
        }

        int width;

        public int Width
        {
            get { return width; }
            set { width = value; }
        }

        int quality;

        public int Quality
        {
            get { return quality; }
            set { quality = value; }
        }

        public override bool Equals(object obj)
        {
            var o = obj as ImageResolution;
            if (o == null)
                return false;

            return true
                && this.width == o.width
                && this.height == o.height
                && this.quality == o.quality;
        }

        public override string ToString()
        {
            var s = string.Format("{0} * {1} * {2}", width, height, quality);

            return s;
        }

        public override int GetHashCode()
        {
            return this.ToString().GetHashCode();
        }
    }
}
